<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>授权设置</title>
    <link href="/static/css/engine.css" rel="stylesheet">
    <link href="/static/css/controls.css" rel="stylesheet"/>
    <link href="/bower_components/bootstrap/css/bootstrap.css" rel="stylesheet">

    <script src="/bower_components/requirejs/require.js" data-main="/static/app.js"
            data-bootstrap-modules="'system2/permission/PermissionModule'"></script>
</head>
<body ng-controller="PermissionController" ng-cloak>
    <div class="engine-tab">
        <ul>
            <li class="{{!showUserGroupAuthView?'on':''}}"><a href="javascript:void(0)" ng-click="showUserGroupAuthView=false;">用户授权</a></li>
            <li class="{{showUserGroupAuthView?'on':''}}"><a href="javascript:void(0)" ng-click="showUserGroupAuthView=true">用户组授权</a></li>
        </ul>
    </div>
    <div class="engine-tab-content" data-key="user-auth" ng-show="!showUserGroupAuthView">
       <div class="engine-tab-content">
            <div class="sqgl-l">
                <div class="engine-test-manage-l">
                    <input style="width:176px;padding:5px;border-radius:3px;border:1px solid #c3c3c3;color:#999999;font-size:10px;"  type="text"  placeholder="用户名" ng-model="search.username">
                    <i class="icon-engine-search"></i>
                </div>
                <div class="clearfix clear"></div>
                <ul>
                    <li ng-repeat="noSelect in noSelects | filter:{username:search.username}">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox"  ng-click="userPermissionOperate(noSelect)">{{noSelect.username}}
                            </label>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="sqgl-r">
			    <div class="sqgl-r-title">已授权用户</div>
                <ul>
                    <li ng-repeat="select in selects">
                      <label>
                        {{select.username}}<a class="icon-engine-removeove" ng-click="deleteSelect(select)"></a>
                      </label>
                  </li>
                </ul>
            </div>
        </div>
    </div>

    <div class="engine-tab-content" data-key="user-group-auth" ng-show="showUserGroupAuthView">
    <div class="engine-tab-content">
        <div class="engine-tab-content">
            <div class="sqgl-l">
                <div class="engine-test-manage-l">
                    <input type="text" style="width:176px;padding:5px;border-radius:3px;border:1px solid #c3c3c3;color:#999999;font-size:10px;" placeholder="组名" ng-model="search.groupName">
                    <i class="icon-engine-search"></i>
                </div>
                <div class="clearfix clear"></div>
                <ul>
                    <li ng-repeat="noSelectGroup in noSelectGroups | filter:{groupName:search.groupName}">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox"  ng-click="userGroupPermissionOperate(noSelectGroup)"/>{{noSelectGroup.groupName}}
                            </label>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="sqgl-r">
			    <div class="sqgl-r-title">已授权用户组</div>
                <ul>
                  <li ng-repeat="selectGroup in selectGroups">
                    <label>
                      {{selectGroup.groupName}}<a class="icon-engine-removeove"  ng-click="deleteSelectGroup(selectGroup)"></a>
                    </label>
                  </li>
                </ul>
            </div>
        </div>
    </div>
</div>
</body>
</html>